<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:template match="/">
        <html>
            
            <head>Curriculo 
                <script type="text/javascript">

                    function CurriculoProfissional(){
                        document.getElementById("Academico").style.display = "none";
                        document.getElementById("Profissional").style.display = "block";
                    }
                    function CurriculoAcademico(){
                        document.getElementById("Academico").style.display = "block";
                        document.getElementById("Profissional").style.display = "none";
                    }
                    
                  
                    function CurriculoCompleto()
                    {
                        document.getElementById("Academico").style.display = "block";
                        document.getElementById("Profissional").style.display = "block";
                    }
                    
                    function CurriculoResumido()
                    {
                    document.getElementById("Academico").style.display = "none";
                    document.getElementById("Profissional").style.display = "none";
                    }               
                    
                    function CorParaImpressao(cor){
                    document.body.style.background = cor;
                    }
                </script>
            </head>
            
            
            <link rel="stylesheet" type="text/css" href="curriculo.css"/>
            
            <body class="LayoutPagina"  >
                Escolha o tipo De visualização :
                    <button  name = "tipo" value="Profissional"   onclick="CurriculoProfissional()"> Profissional</button>
                    <button  name = "tipo" value="Academico"      onclick="CurriculoAcademico()"> Acadêmico</button>
                    <button  name = "tipo" value="Completo"       onclick="CurriculoCompleto()"> Completo</button>
                    <button  name = "tipo" value="Resumido"       onclick="CurriculoResumido()"> Resumido</button>
                    <br/>
                Escolha a Cor do fundo
                <button  name = "tipo" value="CorImpresao"       onclick="CorParaImpressao('#80a780')"> Cor Escura</button>
                <button  name = "tipo" value="CorImpresao"       onclick="CorParaImpressao('#FFFFFF')"> Cor Clara</button>
                
                
                
                
                <xsl:for-each select="curriculo/DadosPessoais">
                  <h3><xsl:value-of select="Nome"/></h3>
                    <p><xsl:value-of select="Nacionalidade"/> ,<xsl:value-of select="EstadoCivil"/>,<xsl:value-of select="Idade"/> Anos</p>
                    
                    <p>Email:
                    <xsl:for-each select="email">
                        <spam class="Dados"><xsl:value-of select="current()"/></spam>;
                    </xsl:for-each>
                    </p>
                    
                    <p>Endereço: <spam class="Dados"><xsl:value-of select="Endereco/Rua"/> , <xsl:value-of select="Endereco/Numero"/> , <xsl:value-of select="Endereco/Cidade"/> ,<xsl:value-of select="Endereco/Estado"/>. </spam></p>
                    
                    <p>Telefone Fixo:
                    <xsl:for-each select="Telefone">
                        <spam class="Dados"><xsl:value-of select="current()"/></spam>;      
                    </xsl:for-each>
                    </p>
                    
                    
                    <p>Telefone Celular:
                    <xsl:for-each select="TelefoneCelular">
                        <spam class="Dados"><xsl:value-of select="current()"/></spam>;
                    </xsl:for-each>
                    </p>
                    
                    <p>Formação:<spam class="Dados"> <xsl:value-of select="GrauDeFormacao"/></spam></p>
                
                </xsl:for-each>
                
                <xsl:if test="curriculo/DadosFormacao"><h1>Formação</h1>
                <xsl:for-each select="curriculo/DadosFormacao">
                    <xsl:if test="Curso"><h2>Cursos</h2></xsl:if>
                    <xsl:for-each select="Curso">
                        <p><spam class="Nome"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                        <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                        <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                        <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                        <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                        <br/>
                    </xsl:for-each>
                    
                    <xsl:if test="Idioma"><h2>Idiomas</h2></xsl:if>
                    <xsl:for-each select="Idioma">
                        <p>-<spam class="Dados"> <xsl:value-of select="current()/Nome"/> </spam>    (Fluência:<spam class="Dados"> <xsl:value-of select="current()/Fluencia"/>) </spam> </p>
                       
                    </xsl:for-each>
                    <br/>
                </xsl:for-each>
                </xsl:if>
                
                

                
                <span id="Profissional">
                <xsl:if test="curriculo/DadosProfissionais"><h1>Informações Profissionais</h1>
                <xsl:for-each select="curriculo/DadosProfissionais">
                    <xsl:if test="Proeficiencias"><h2>Proficiências</h2></xsl:if>
                    <xsl:for-each select="Proeficiencias">
                        <p>-<spam class="Dados"> <xsl:value-of select="current()"/> </spam> </p>
                        
                    </xsl:for-each>
                    <xsl:if test="Experiencia"><h2>Experiência Profissional</h2></xsl:if>
                    <xsl:for-each select="Experiencia">
                        <p>    Cargo:<spam class="Dados"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                        <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                        <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                        <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                        <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                        <br/>
                    </xsl:for-each>
                    
                    <xsl:if test="ExperienciaAdicionais"><h2>Experiências Adicionais</h2></xsl:if>
                    <xsl:for-each select="ExperienciaAdicionais">
                        <p><spam class="Nome"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                        <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                        <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                        <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                        <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                        <br/>
                    </xsl:for-each>
                    

                </xsl:for-each>
                </xsl:if>
                </span>
            
                <span id="Academico">
                    <xsl:if test="curriculo/DadosAcademicos"><h1>Informações Acadêmicas</h1>
                        
                        <xsl:for-each select="curriculo/DadosAcademicos">
                            
                            <xsl:if test="PosGraduacao"><h2>Cursos De Pós-Graduação</h2></xsl:if>
                            <xsl:for-each select="PosGraduacao">
                                <p><spam class="Nome"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                                <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                                <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                                <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                                <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                                <br/>
                            </xsl:for-each>
                            
                            <xsl:if test="Graduacao"><h2>Cursos De Graduação</h2></xsl:if>
                            <xsl:for-each select="Graduacao">
                                <p><spam class="Nome"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                                <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                                <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                                <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                                <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                                <br/>
                            </xsl:for-each>
                            
                            <xsl:if test="AtividadesExtracurriculares"><h2>Atividades Extracurriculares</h2></xsl:if>
                            <xsl:for-each select="AtividadesExtracurriculares">
                                <p>    <spam class="Nome"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                                <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                                <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                                <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                                <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                                <br/>
                            </xsl:for-each>
                            
                            
                            
                            <xsl:if test="CargosInstitucionais"><h2>Cargos Institucionais</h2></xsl:if>
                            <xsl:for-each select="CargosInstitucionais">
                                <p>    Cargo:<spam class="Dados"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                                <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                                <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                                <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                                <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                                <br/>
                            </xsl:for-each>
                            
                            
                            
                            <xsl:if test="Publicacoes"><h2>Publicações</h2></xsl:if>
                            <xsl:for-each select="Publicacoes">
                                <p>    Titulo:<spam class="Dados"> <xsl:value-of select="current()/Titulo"/> </spam> </p>
                                <p>    Autores:<spam class="Dados"> <xsl:value-of select="current()/Autores"/> </spam>  </p>
                                <P>    Data de publicação:<spam class="Dados"> <xsl:value-of select="current()/Data"/> </spam>  </P>
                                <p>    Publicado em:<spam class="Dados"> <xsl:value-of select="current()/PublicadoEm"/> </spam>  </p>
                                <xsl:if test="current()/DOE"> <P>    DOE: <spam class="Dados"> <xsl:value-of select="current()/DOE"/> </spam>  </P></xsl:if>
                                <xsl:if test="current()/ICBM"><P>   ICBM:  <spam class="Dados"> <xsl:value-of select="current()/ICBM"/> </spam>  </P></xsl:if>
                                <br/>
                            </xsl:for-each>
                            
                            <xsl:if test="Orientacoes"><h2>Orientações</h2></xsl:if>
                            <xsl:for-each select="Orientacoes">
                                <p>    <spam class="Dados"> <xsl:value-of select="current()/Aluno"/> </spam> </p>
                                <p>    <spam class="Dados"> <xsl:value-of select="current()/Nivel"/> </spam> </p>
                                <p>    Tema:<spam class="Dados"> <xsl:value-of select="current()/Dados/Nome"/> </spam>  </p>
                                <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Dados/Instituicao"/> </spam>  </p>
                                <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/Dados/DataEntrada"/> </spam>  </P>
                                <xsl:if test="current()/Dados/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/Dados/DataSaida"/> </spam>  </P></xsl:if>
                                <xsl:if test="current()/Dados/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/Dados/OBS"/> </spam>  </P></xsl:if>
                                
                                <br/>
                            </xsl:for-each>
                            
                        </xsl:for-each>
                        
                    </xsl:if>
                </span>            
          
    
                    <xsl:for-each select="curriculo/DadosFormacao">
                
                        <xsl:if test="CursoRapido"><h1>Cursos De Curta Duração</h1></xsl:if>
                        <xsl:for-each select="CursoRapido">
                            <p><spam class="Nome"> <xsl:value-of select="current()/Nome"/> </spam> </p>
                            <p>    Instituição:<spam class="Dados"> <xsl:value-of select="current()/Instituicao"/> </spam>  </p>
                            <P>    Data De Inicio:<spam class="Dados"> <xsl:value-of select="current()/DataEntrada"/> </spam>  </P>
                            <xsl:if test="current()/DataSaida"><P>    Data De Término:<spam class="Dados"> <xsl:value-of select="current()/DataSaida"/> </spam>  </P></xsl:if>
                            <xsl:if test="current()/OBS"><P>    Outras Informações:  <spam class="Dados"> <xsl:value-of select="current()/OBS"/> </spam>  </P></xsl:if>
                            <br/>
                        </xsl:for-each>
                        
                        <xsl:if test="Outros"><h1>Informações Adicionais</h1></xsl:if>
                        <xsl:for-each select="Outros">
                            <p> -<spam class="Dados"> <xsl:value-of select="current()"/> </spam> </p>
                        </xsl:for-each>
                        <br/>
                    </xsl:for-each>
                
            </body>
            
        </html>
    </xsl:template>
</xsl:stylesheet>
